package com.example.foo.fttcard20220715.dao;

import org.apache.commons.lang3.StringUtils;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.core.PageResult;
import com.example.core.Pageable;
import com.example.foo.fttcard20220715.model.FttCard20220715;
import com.example.foo.fttcard20220715.query.FttCard20220715Query;

@Deprecated//TODO remove
@org.apache.ibatis.annotations.Mapper
public interface FttCard20220715Dao extends com.example.core.dao.BaseDao<FttCard20220715, Long> {

	public default PageResult<FttCard20220715> findFttCard20220715s(FttCard20220715Query fttCard20220715Query, Pageable pageable) {
		QueryWrapper<FttCard20220715> queryWrapper = createQueryWithBaseIf(fttCard20220715Query);
		//
		if (StringUtils.isNotEmpty(fttCard20220715Query.getCellphone())) {
			queryWrapper.eq("cellphone", fttCard20220715Query.getCellphone());
		}
		if (fttCard20220715Query.getState() != null) {
			queryWrapper.eq("state", fttCard20220715Query.getState());
		}
		return findPages(queryWrapper, pageable);
	}

}
